//
//  ZWHAlertController.swift
//  茶吧
//
//  Created by Syrena on 2017/7/7.
//  Copyright © 2017年 Syrena. All rights reserved.
//

import UIKit

class ZWHAlertController: UIAlertController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
    }

    class func showAlert(vc:UIViewController,title:String?,message:String?,style:UIAlertControllerStyle) {
        let alert = ZWHAlertController(title: title, message: message, preferredStyle: style)
        vc.present(alert, animated: true) { 
            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1, execute: { 
                alert.dismiss(animated: true, completion: nil)
            })
        }
    }

}
